package org.JQbitorrentClinet.request.search;

import com.google.gson.reflect.TypeToken;
import lombok.Builder;
import org.JQbitorrentClinet.base.BasePostUrlEncodedParam;
import org.JQbitorrentClinet.pojo.search.SearchJobResult;

import java.util.List;

@Builder
public class GetSearchResultParam extends BasePostUrlEncodedParam {
    Integer id;
    Integer limit;
    Integer offset;

    public GetSearchResultParam(Integer id, Integer limit, Integer offset) {
        this.id = id;
        this.limit = limit;
        this.offset = offset;
        responseType = new TypeToken<SearchJobResult>() {
        }.getType();

    }

    @Override
    public String getApiUrl() {
        return "/api/v2/search/results";
    }
}
